package com.ikun.mybatisstudy.services.impl;

import com.ikun.mybatisstudy.dto.User;
import com.ikun.mybatisstudy.mapper.UserDao;
import com.ikun.mybatisstudy.services.UserService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

/**
 * @Classname UserServiceImpl
 * @Description TODO
 * @Date 2025/3/20 10:10
 * @Created by Song zuo gang
 */
@Service("UserService")
public class UserServiceImpl implements UserService {

    @Resource
    UserDao userDao;

    @Override
    public boolean updateUser(User user) {
        return userDao.updateUser(user)>0;
    }

    @Override
    public User queryById(int id) {
        return userDao.queryById(id);
    }

    @Override
    public boolean insert(User user) {
        return userDao.insertUser(user);
    }
}
